package de.fuberlin.inf.alp2.ue10.a1;

import java.util.ArrayList;

public class Datenbank {
	ArrayList<Disc> discs;
	public Datenbank(){
		discs = new ArrayList<Disc>();
	}
	public void addDisc(Disc disc){
		discs.add(disc);
	}
	public void removeDisc(Disc disc){
		discs.remove(disc);
	}
	public Disc getDisc(int index){
		return discs.get(index);
	}
	public ArrayList<Disc> findDiscs(String titel){
		ArrayList<Disc> ret = new ArrayList<Disc>();
		for (Disc disc : discs) {
			if (disc.getTitel().indexOf(titel) != -1)
				ret.add(disc);
		}
		return ret;
	}
}
